<?php
$db = require 'db.php';
require 'function.php';
$db[]=$_POST;
if(save($db)){
	$result =array(
		'state'=>'success',
		'message'=>'发表成功',
		'data'=>$_POST,
		);
	echo json_encode($result);
	

}
else{
	$result =array(
		'state'=>'success',
		'message'=>'发表失败',
		);
	echo json_encode($result);
}

?>